home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / MATH / FSULTRA1.ZIP / ULTRAFX.PAS < prev    next >
Pascal/Delphi Source File  |  1992-06-01  |  2KB  |  83 lines

  1. ULTRA        The greatest random number generator that ever was
  2.         or ever will be.  Way beyond Super-Duper.
  3.         (Just kidding, but we think its a good one.)
  4.  
  5. Authors:    Arif Zaman (arif@stat.fsu.edu) and
  6.         George Marsaglia (geo@stat.fsu.edu).
  7.  
  8. Date:        27 May 1992
  9.  
  10. Version:    1.05
  11.  
  12. Copyright:    To obtain permission to incorporate this program into
  13.         any commercial product, please contact the authors at
  14.         the e-mail address given above or at
  15.  
  16.         Department of Statistics and
  17.         Supercomputer Computations Research Institute
  18.         Florida State University
  19.         Tallahassee, FL 32306.
  20.  
  21. See Also:    README        for a brief description
  22.         ULTRA.DOC    for a detailed description
  23.  
  24. -----------------------------------------------------------------------
  25. {
  26.   File: ULTRATPU.PAS (Program to make a .TPU file)
  27. }
  28. {$IFDEF x}            unit ultrax;
  29. {$ELSE} {$IFDEF f}        unit ultraf;
  30.     {$ELSE}    {$IFDEF fx}    unit ultrafx;
  31.         {$ELSE}        unit ultra;
  32. {$ENDIF}{$ENDIF}{$ENDIF}
  33.  
  34. interface
  35.  
  36. Function i32bit : LongInt;
  37. Function i31bit : LongInt;
  38. Function i16bit : Integer;    { You can declare this to be Word }
  39. Function i15bit : Integer;
  40. Function i8bit  : ShortInt;    { You can declare this to be Byte }
  41. Function i7bit  : ShortInt;
  42. Function i1bit  : Boolean;
  43. Function uni    : Single;
  44. Function vni    : Single;
  45. Function duni   : Double;
  46. Function dvni   : Double;
  47. Procedure rinit(x,y : LongInt);
  48.  
  49. implementation
  50.  
  51. type cp  = record c: Integer; p: Pointer; x: Array [0..36] of LongInt; end;
  52.  
  53. var    SWBstate: Array [0..4*sizeof(cp)+37] of byte;
  54.     tmpq    : Comp;
  55.  
  56. const    neg31    : Integer = -31;
  57.     neg63    : Integer = -63;
  58.     SWBsize : Integer = sizeof(SWBstate);
  59.  
  60. Function i32bit : LongInt;   external;
  61. Function i31bit : LongInt;   external;
  62. Function i16bit : Integer;   external;
  63. Function i15bit : Integer;   external;
  64. Function i8bit  : ShortInt;  external;
  65. Function i7bit  : ShortInt;  external;
  66. Function i1bit  : Boolean;   external;
  67. Function uni    : Single;    external;
  68. Function vni    : Single;    external;
  69. Function duni   : Double;    external;
  70. Function dvni   : Double;    external;
  71. Procedure rinit(x,y : LongInt);  external;
  72.  
  73. {$IFDEF x}            {$L ultrx_tp.obj}
  74. {$ELSE}    {$IFDEF f}        {$L ultrf_tp.obj}
  75.     {$ELSE}    {$IFDEF fx}    {$L ultfx_tp.obj}
  76.         {$ELSE}        {$L ultra_tp.obj}
  77. {$ENDIF}{$ENDIF}{$ENDIF}
  78.  
  79. begin rinit(1234567,7654321);
  80. end.
  81.